#include"Shared_ptr.h"
#include<atomic>
#include<memory>
using namespace std;
int main()
{
	//Shared_ptr<int> sp(new int(1));

	//std::cout << *sp << std::endl;


	shared_ptr<int> sp(new int(1));
	cout << *sp << endl;
	sp.reset();
	cout << sp.use_count() << endl;

	shared_ptr<int> sp2;
	cout << sp2.use_count() << endl;
	sp2 = nullptr;

	atomic<int> n;
	n = 20;
	cout << n << endl;
	int c = n.load();
	cout << c << endl;
	int e = 40;
	n.store(e);
	cout << e << endl;


	return 0;
}